#include <REGX52.H>
#include "Delay.h"
#include "MatrixLED.h"

unsigned char Animation[]={
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0xFF,0x08,0x08,0x08,0xFF,0x00,0x0E,0x15,
	0x15,0x15,0x08,0x00,0x7E,0x01,0x02,0x00,
	0x7E,0x01,0x02,0x0E,0x11,0x11,0x11,0x0E,
	0x00,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};

void main()
{
	unsigned char i;
	unsigned char Offset;
	unsigned char Count = 0;
	MatrixLED_Init();
	while(1)
	{
		for(i=0;i<8;i++)
		{
			MatrixLED_showColumn(i,Animation[i+Offset]);
		}
		Count++;
		if(Count>10)
		{
			Count = 0;
			Offset++;
			if(Offset>40)
			{
				Offset = 0;
			}
		}
	}
}
